package com.qf.service.impl;

import com.qf.entity.Emp;
import com.qf.mapper.EmpMapper;
import com.qf.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpMapper EmpMapper;
    // Service实现类
    @Override
    public int addEmp(Emp emp) {
        return EmpMapper.addEmp(emp);
    }

    @Override
    public int deleteEmp(String ename) {
        return EmpMapper.deleteEmp(ename);
    }

    @Override
    public int updateEmp(Emp emp) {
        return EmpMapper.updateEmp(emp);
    }

    @Override
    public Emp queryEmp(String ename) {
        return EmpMapper.queryEmp(ename);
    }

    @Override
    public List<Emp> listByMap(Map<String, String> map) {
        return EmpMapper.listByMap(map);
    }


}
